// eslint-disable-next-line no-undef
const joi = require('@hapi/joi')

const name = joi.string().required()
const alias = joi.string().alphanum().required()
const id = joi.number().integer().min(1).required()

// 校验规则对象——添加分类
// eslint-disable-next-line no-undef
exports.add_cate_schema = {
  body: { name, alias }
}

// 校验规则对象 - 删除分类
// eslint-disable-next-line no-undef
exports.delete_cate_schema = {
  params: {
    id
  }
}

// 校验规则对象 - 更新分类
// eslint-disable-next-line no-undef
exports.update_cate_schema = {
  body: {
    Id: id,
    name,
    alias
  }
}
